<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <link rel="stylesheet" href="./css/reset.css">
  <link rel="stylesheet" href="./css/common.css">
  <style>
    .main .section-content {
      display: flex;
      justify-content: space-between;
    }

    .main .section-content .left-content {
      width: 872px;
      height: 1000px;
    }
    .main .section-content .right-content {
      width: 295px;
      height: 500px;
    }
  </style>
</head>
<body>
<div class="main main_wrapper">
  <div class="section-content">
    <div class="left-content">
      <div class="content-center">
        <div class="section_header">
          <div class="header_left">
            <h3 class="title">内容中心</h3>
          </div>
          <div class="header_right" href="#">
            <a class="more" href="#">更多</a>
          </div>
        </div>
        <div class="tab_control">
          <div class="item active">精品栏目</div>
          <div class="line"></div>
          <div class="item">赛事精品</div>
          <div class="line"></div>
          <div class="item">英雄攻略</div>
        </div>
        <div class="video-list">精品栏目</div>
      </div>
    </div>
  </div>
</div>
<script>
  const tabControlEl = document.querySelector('.tab_control')
  /*拍他，先拿到active的DOM，在去除该DOM的active类，添加最新的active*/
  let activeEl = document.querySelector('.active')
  tabControlEl.addEventListener('mouseover',(event)=>{
    if(event.target.classList.contains('item')){
      /*先移除*/
      activeEl.classList.remove('active')
      /*在添加*/
      event.target.classList.add('active')
      /*重新赋值 event.target*/
      activeEl = event.target
    }
  })
</script>
</body>
</html>